alter table jms_dm.dm_waybill_simple_info_dt set tblproperties ('external.table.purge'='true');
drop table jms_dm.dm_waybill_simple_info_dt;
CREATE EXTERNAL TABLE jms_dm.dm_waybill_simple_info_dt(
  waybill_no string COMMENT '运单号',
  pick_network_code string COMMENT '取件网点',
  terminal_dispatch_code string COMMENT '三段码',
  dispatch_network_code string COMMENT '派件网点',
  package_inside_charge_weight decimal(10,2) COMMENT '内部计费重量',
  taking_scan_time timestamp COMMENT '揽收时间',
  taking_scan_date date COMMENT '揽收日期',
  taking_scan_hs string COMMENT '揽收时分秒')
COMMENT '运单简单信息'
PARTITIONED BY (
  dt string COMMENT '揽收日期或者订单/运单录入时间')
STORED AS PARQUET
LOCATION '/dw/hive/jms_dm.db/external/dm_waybill_simple_info_dt'
TBLPROPERTIES (
    'discover.partitions' = 'false',
    'parquet.column.index.access' = 'true'
 );